$(function(){
					
						layui.use('element', function() {
					var element = layui.element;
					var $ = layui.jquery;
					$("ul.layui-nav a").on("click", function() {
						if($(this).attr("prentId") != 0) {
							  var lid=$(this).attr("data-id");
							  console.log(lid);
							if($("#ifm_"+lid).length == 0) {
							
								element.tabAdd("demo", {
									title: $(this).text() 
									,
									content: "<iframe src=\"" +$(this).data('url') + "\" id='ifm_" + lid + "'></iframe>" //'选项卡的内容' //支持传入html
										,
									id: "lid_" + lid
								});
								element.tabChange("demo", "lid_" + lid);
							} else {
								 
								element.tabChange("demo", "lid_" + lid);
							}
							$(".layui-tab-brief .layui-tab-item>iframe").height($(".layui-side-scroll").height() - 110);
						}
					});
					//底部45+选项卡40，中间padding 10*2,边框
					$(".layui-tab-brief .layui-tab-item>iframe").height($(".layui-side-scroll").height() - 110);

				});
					
					
				});